Incremental motion control is the most common class of programmable motor control Systems. Incremental motion control includes servo motor control and stepper motor control. In both cases the position of a motor is known through the ongoing accumulation of known incremental changes in motor position.
Servo motor position is monitored through a position sensor. A common and important sensor class is the quadrature encoder. A quadrature encoder produces a pair of square waves typically noted as "A" and "B" channels, representing motor movement. A properly aligned encoder shows a 90.degree. phase difference between the A and B channels from which the motor direction can be inferred. A common rotary encoder resolution is 500 A and B cycles per revolution. Each transition of the A and B channels can be detected to discern four times this number of incremental counts. A 500 "slit" encoder therefore produces 2000 "counts" of information for each encoder rotation.
An important part of an incremental motion controller is the electronics which monitors the quadrature encoder and reports this position information to the controlling processor. This motion control electronics is commonly called a "Quadrature Decoder". FIG. 1 shows a typical implementation of a quadrature decoder containing the following elements:
Differential receivers 1 on encoder lines PA1 Digital Filters 2 to eliminate effects of electrical noise on encoder signals PA1 Quadrature to Up/Down conversion including .times.4 edge detection 3 PA1 Up/Down signals to Cumulative Position Counter 4 PA1 Position Counter to Position Latch 5 which keeps information stable during read PA1 Additional digital filters 9 for the capture input and index signals PA1 Additional latches 6 to retain position count when capture events occur PA1 Additional latches to retain compare value with comparison and output control 10
Advanced motion control systems include additional functions which augment this basic operation. One function is "Position Capture" which uses a capture latch 6 to record the current motor position based on an external signal. This function is used for high-speed registration applications where the motor position must be known in relation to an external event sensed through the "C" input 7 or the "Index" pulse or "I" channel 8 on an encoder. The index pulse is a once-per-revolution signal often used in machine initialization.
An additional function is "Position Compare" which continually compares the motor position against a specified value and produces an output signal when this position is reached. Supporting these additional functions requires:
Position information is commonly represented in hardware counters having much less range than the range of the control system. The hardware range must span the distance travelled in one controller sample period. The controller links information from one sample to the next in software to create a range much greater than the range of the hardware alone. Controller sample rates of 1 millisecond to 250 microseconds are common. Hardware count ranges of 12 bits are common. A 1 millisecond controller can compare a 12 bit position register against a previous value and detect without ambiguity a change of plus or minus 2047 counts. This allows a 1 millisecond sample rate controller to monitor count rates of approximately 2 MHz, a fairly high speed for a motion system. Higher sample rates permit higher count rates.
These combined functions require approximately 100 digital flip-flops to implement. Advanced motion controllers often have 8 axes on a single card requiring as many as 800 flip-flops for this section of the control system. The common implementation is a Gate Array, which is expensive to develop and expensive to change as technology progresses.
Field Programmable Gate Arrays (FPGAs) allow a designer to create and alter hardware designs with little expense. However the per-flip-flop cost of an FPGA is currently 5 times the cost of the same function implemented in a conventional gate array for the same hardware design.
A relatively new feature of FPGA's is "Granular User Memory" available within the FPGA design. Augmenting the conventional logic and flip-flops are small blocks of memory that can be arranged into various memory structures and distributed throughout the device. The Lucent Technology "ORCA" series and Xilinx 4000 series devices are examples of devices which support distributed, granular user memory.
An ongoing trend in FPGAs has been increasing device frequency. If conventional quadrature decoding circuit design is used with modern FPGAs, count rates of up to 30 MHz are achievable. However the sensors attached to the motors seldom generate frequencies higher than 1 MHz. With a conventional design the FPGA is underutilized and the solution is overpriced.
One method that has been utilized in the prior art to improve the performance of motion control systems is found in the "Programmable Counter/Timer Device with Programmable Registers Having Programmable Functions", of Morinaga, et al., U.S. Pat. No. 5,089,955. This device uses a plurality of registers that are capable of various functions as directed by microcode instructions. The instructions are cyclically scanned to successively read out register operations, thereby enabling the device to perform an ongoing pattern of calculations and register transactions. One shortcoming of this device is that there is only one register bus. Therefore operations cannot be performed simultaneously, but must be performed in sequence. Another related shortcoming of this device is that the CPU must manipulate the "write" and "read" buffers on an axis-by-axis basis. Accordingly, there is no means of obtaining a single current readout of the position of all axes, but rather the position sensing is a continually staggered operation.
Accordingly, it is an object of the present invention to provide a means to monitor quadrature encoder positions in an incremental motion control system.
It is a further object of the present invention to provide quadrature decoder support for multiple motors (i.e. 16).
It is a still further object of the present invention to provide this support by means of a single quadrature decoder and novel multiplexing techniques so as to rapidly share the decoder among 16 channels. This allows the present invention to avoid replicating the hardware used in the prior art 16 times to control 16 motors.
It is yet another object of the present invention to provide "shadow memory" which allows position data from all controlled axes to be copied into buffers that can be taken out of the active control loop so that current information from all axes is available simultaneously.